import {mapGetters} from 'vuex'
export default {
  data(){
    return{
      text:0
    };
  },
  computed:{
    ...mapGetters('cart',['changeInfo'])
  },
  watch:{
   changeInfo:function (){
    uni.setTabBarBadge({
      index:2,
      text:this.changeInfo + ''
    }) 
   }
  },
  onShow(){
    uni.setTabBarBadge({
      index:2,
      text:this.changeInfo + ''
    })
  }
}